package com.suao.transportInfo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.suao.common.annotation.Excel;
import com.suao.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 出车信息管理对象 suao_transport_info
 *
 * @author tyz
 * @date 2023-02-27
 */
@Data
public class TransportInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 司机ID */
    @Excel(name = "司机ID")
    private Long userId;
    
    @Excel(name = "司机名称")
    private String nickName;

    /** 出车日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出车日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transportTime;

    /** 起点 */
    @Excel(name = "起点")
    private String startPoint;

    /** 终点 */
    @Excel(name = "终点")
    private String endPoint;

    /** 公里数 */
    @Excel(name = "公里数")
    private Long kilometer;

    /** 运费 */
    @Excel(name = "运费")
    private BigDecimal freight;

    /** 状态（0已结算 1待结算） */
    private String status;
    
    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("transportTime", getTransportTime())
            .append("startPoint", getStartPoint())
            .append("endPoint", getEndPoint())
            .append("kilometer", getKilometer())
            .append("freight", getFreight())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
